app.controller('NotifysSendCtrl', function ($scope, $modalInstance, toaster, param) {

	$scope.param = param;
	if ($scope.param.data == null) {
		$scope.param.data = {};
	}

	$scope.ok = function () {
		if ($scope.content == undefined || $scope.content == null) {
			toaster.pop('warning', '提示', '内容不可为空并且在200字以内！');
		}
		if ($scope.subject == undefined || $scope.subject == null) {
			toaster.pop('warning', '提示', '标题不可为空！');
		}
		if ($scope.myForm.$valid) {
			$scope.param.subject = $scope.subject;
			$scope.param.content = $scope.content;
			$modalInstance.close($scope.param);
		}
	};

	$scope.cancel = function () {
		$modalInstance.dismiss('cancel');
	};
});